<?php use_helper('Date') ?>
<?php
if(count($topics)) { ?>
<h2 class="block_title_red"><span class='navispan'><a
	href='<?php echo url_for('default/index').'forum' ?>'> <?php echo 'Телеком форум'?></a></span></h2>
<?php foreach($topics as $topic) { ?>
<div style="font-family: Arial; font-size: 12px; padding-top: 5px;"><?php

//echo date("d.m.y");  echo '<br />';
//echo format_date($topic['last_post'],'d');		 echo '<br />';

if (format_date($topic['last_post'],'d') == date("d.m.y")){
	echo format_date($topic['last_post'], 't');
}
else{ 
	echo format_date($topic['last_post'], 'D');
}
?> 
<a href="<?php echo url_for('default/index').'forum/viewtopic.php?id='.$topic['id'] ?>"><?php  echo $topic['subject']; ?></a>
</div>
<div style='min-height: 5px'></div>
<?php }} ?>